<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>player</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<style type="text/css" media="screen">
		html, body { height:100%; background-color: #000000;}
		body { margin:0; padding:0; overflow:hidden; }
		#flashContent { width:100%; height:100%; }
  </style>
    <!--
    <script type="text/javascript" src="swfobject/swfobject.js"></script>
    <script type="text/javascript">
    swfobject.registerObject("player", "11.2.202");
    </script>
    -->
  <script type="text/javascript" language="javascript">
     function strip(html) {
        var tmp = document.createElement("DIV");
        tmp.innerHTML = html;
        return tmp.textContent||tmp.innerText;
     };


      var country_num = {'es2': 16, 'es': 16, 'fr': 4, 'cz': 33, 'it': 26, 'tr': 22, 'trt': 22, 'de': 40};
      var parts = window.location.search.substr(1).split("&");
      var $_GET = {};
      for (var i = 0; i < parts.length; i++) {
          var temp = parts[i].split("=");
          $_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
      }

      var title = $_GET['title'];
      if (typeof(title) == 'undefined')
          title = 'Movie - full version';
      else
          title = strip(title);
      title = encodeURIComponent(title);

      var param_w = '';
      if( typeof($_GET['w']) != 'undefined')
      {
        param_w = '&w=' + $_GET['w'];
      }

      var theme = country_num[$_GET['country']]
      if($_GET.hasOwnProperty('forcetheme'))
      {
          theme = $_GET['forcetheme'];
      }
      var redirection_url = 'http://creative.m2pub.com/matomy/scripts/direct/direct.html?a=12467602&serverdomain=s.m2pub.com&context=c25811447&size=800x600&rt=popunder&ci=10';
      var width = false;
      var height = false;
      if($_GET.hasOwnProperty('width'))
      {
        width = parseInt($_GET['width']);
      }
      if($_GET.hasOwnProperty('height'))
      {
        height = parseInt($_GET['height']);
      }

      var apply_aspect = false;
      if (!width) { width = 642; apply_aspect = true; }
      if (!height) { height = 399; apply_aspect = true; }

      if(apply_aspect)
      {
          var d = 642/399;
          var nd = width/height;
          if(nd > d && nd - d > 0.001)
          {
            if(height < 399)
            {
              width = Math.ceil(642 * (height/399));
            }
            else if(width > 642)
            {
              height = Math.ceil(399 * (width/642));
            }
          }
          else if (nd < d && d - nd > 0.001)
          {
            if(width < 642)
            {
              height = Math.ceil(399 * (width/642));
            }
            else if(height > 399)
            {
              width = Math.ceil(642 * (height/399));
            }
          }
      }
      var link = 'http://api.adlure.biz/partner/click/' + $_GET['hash'] + '/' + theme + '/?PID=' + $_GET['pid'] + param_w + '&F=' + title + '&PM=';
      link = encodeURIComponent(link);

  </script>
	</head>
  <body>
    <div id="flashContent">
      <script type="text/javascript">
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+width+'" height="'+height+'" id="player" align="middle">');
      </script>
        <script type="text/javascript" language="javascript">
            document.write('<param name="movie" value="player_' + $_GET['country'] + '.swf" />');
        </script>
				<param name="quality" value="high" />
				<param name="bgcolor" value="#000000" />
				<param name="play" value="true" />
				<param name="loop" value="true" />
				<param name="wmode" value="window" />
				<param name="scale" value="showall" />
				<param name="menu" value="true" />
				<param name="devicefont" value="false" />
				<param name="salign" value="" />
				<param name="allowScriptAccess" value="sameDomain" />
        <!--[if !IE]>-->
        <script type="text/javascript" language="javascript">
            document.write('<object type="application/x-shockwave-flash" data="player_' + $_GET['country'] + '.swf" width="'+width+'" height="'+height+'">');
        </script>
          <script type="text/javascript" language="javascript">
            document.write('<param name="movie" value="player_' + $_GET['country'] + '.swf" />');
          </script>
					<param name="quality" value="high" />
					<param name="bgcolor" value="#000000" />
					<param name="play" value="true" />
					<param name="loop" value="true" />
					<param name="wmode" value="window" />
					<param name="scale" value="showall" />
					<param name="menu" value="true" />
					<param name="devicefont" value="false" />
					<param name="salign" value="" />
          <param name="allowScriptAccess" value="sameDomain" />
          <script type="text/javascript" language="javascript">
            //document.write('<param name="FlashVars" value="movieTitle=' + title + '&targetUrl=' + 'http://api.adlure.biz/partner/click/' + $_GET['hash'] + '/' + country_num[$_GET['country']] + '/?PID=' + $_GET['pid'] + escape('&F=') + title + escape('&PM=') + '" />');
document.write('<param name="FlashVars" value="movieTitle=' + title + '&targetUrl=' + link + '" />');
          </script>
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflash">
						<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
		</div>
	</body>
</html>